<!--
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: 朱江洲
 * @Date: 2021-12-13 11:07:27
 * @LastEditors: 朱江洲
 * @LastEditTime: 2022-05-10 10:49:44
-->
<template>
  <div class="app-container">
    <div class="header">
      <div class="bread">
        <img src="@/assets/images/icon-batch.png" alt="" />
        <span style="margin-left: 10px">业务参数设置</span>
      </div>
    </div>
    <div class="content">
      <div class="left">
        <div
          class="left-moule"
          v-for="(item, index) in moduleList"
          :key="index"
          :class="active == index ? 'active' : ''"
          @click="toggle(index)"
        >
          {{ item.label }}
        </div>
      </div>
      <div class="right">
        <further v-if="active == 0"></further>
        <opt-status v-else-if="active == 1"></opt-status>
        <number v-else-if="active == 2"></number>
        <draft v-else-if="active == 3"></draft>
        <business v-else-if="active == 4"></business>
        <pay-plan v-else-if="active == 5"></pay-plan>
      </div>
    </div>
  </div>
</template>

<script>
import Draft from "./components/draft.vue";
import Further from "./components/Further.vue";
import Number from "./components/number.vue";
import optStatus from "./components/optStatus.vue";
import Business from "./components/business.vue";
import PayPlan from './components/payPlan.vue';
export default {
  components: { Further, optStatus, Number, Draft, Business, PayPlan },
  data() {
    return {
      active: 0,
      moduleList: [
        {
          value: 1,
          label: "更进类型设置",
        },
        {
          value: 2,
          label: "商机状态组设置",
        },
        {
          value: 3,
          label: "编号管理",
        },
        {
          value: 4,
          label: "草稿管理",
        },
        {
          value: 5,
          label: "关联商机管理",
        },
        {
          value: 6,
          label: "关联回款计划管理",
        },
      ],
    };
  },
  methods: {
    //   切换
    toggle(i) {
      console.log(i);
      this.active = i;
    },
  },
};
</script>

<style lang="less" scoped>
.header {
  width: 100%;
  height: 74px;
  display: flex;
  justify-content: space-between;
  //   border-bottom: 1px solid #ececec;
  .bread {
    margin-top: 20px;
    margin-left: 5px;
    height: 30px;
    display: flex;
    vertical-align: middle;
    line-height: 30px;
    p {
      margin-left: 10px;
      font-size: 16px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #2b2b2b;
    }
  }
}
.content {
  width: 100%;
  height: 85vh;
  display: flex;
  justify-content: space-between;
  .left {
    padding-top: 20px;
    width: 20%;
    height: 100%;
    border-right: 1px solid #ececec;
    border-top: 1px solid #ececec;

    .left-moule {
      margin-bottom: 20px;
      width: 100%;
      height: 50px;
      line-height: 50px;
      text-align: center;
    }
  }
  .right {
    width: 79%;
    height: 100%;
    border-left: 1px solid #ececec;
    border-top: 1px solid #ececec;
    overflow-y: auto;
  }
}
.active {
  border-left: 4px solid #1267fb;
  background-color: #fafafa;
  color: #1267fb;
}
</style>